Skip to content

Conversation

minimit
Copy link

@minimit minimit commented Oct 22, 2014

with

// @codekit-prepend path/to/file.js
// @codekit-append path/to/file.js

As I explained it's the syntax this 'precompiler' sofwares use. #30

The lines added are very simple, I just:

  • added one regex for prepend and one regex for append (you should be able to add your own if you want)
  • executed expand() with the new argument regex
  • added directive checks
  • with the functions prependString() and appendString() I cached the results, that I add to newText during buffer.

Also I added optional [] on multiple files for this syntax

// @codekit-prepend "path/to/file.js", "path/to/file.js"

// @codekit-prepend path/to/file.js
// @codekit-append path/to/file.js
@minimit
Copy link
Author

minimit commented Oct 23, 2014

I don't know how to run the tests. Will look into it if it's needed.

@pixelfuture
Copy link

This is brilliant. Can we get this committed? This is exactly what I need.

@KenEucker
Copy link
Collaborator

All that this pull request needs now is some tests created around the use cases for this feature. I will circle back to this item after we get through the more critical PRs and resolve the conflicts if I need to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants